# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=kbookmarks
pkgver=5.72.0
pkgrel=0
pkgdesc="Support for bookmarks and the XBEL format"
arch="all !armhf" # armhf blocked by extra-cmake-modules
url="https://community.kde.org/Frameworks"
license="LGPL-2.1-or-later"
depends_dev="qt5-qtbase-dev kconfig-dev kcoreaddons-dev kcodecs-dev kconfigwidgets-dev kwidgetsaddons-dev kxmlgui-dev"
makedepends="$depends_dev extra-cmake-modules qt5-qttools-dev doxygen"
checkdepends="xvfb-run"
source="https://download.kde.org/stable/frameworks/${pkgver%.*}/kbookmarks-$pkgver.tar.xz"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_QCH=ON
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE xvfb-run ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}
sha512sums="67311098678fc670fbadecf0a0f49d97e43d650196600c9d24d3c998785b0bdf72e622ed99d2adc4450ebb6c9df2e3ee25a8d2a3586ef09a119864fac375b431  kbookmarks-5.72.0.tar.xz"
